package Entities;

import java.util.Objects;

public class BookTagEntity {
    private int tagId;
    private String tagName;
    private Integer tagLevel;
    private Integer fatherTagId;

    public int getTagId() {
        return tagId;
    }

    public void setTagId(int tagId) {
        this.tagId = tagId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public Integer getTagLevel() {
        return tagLevel;
    }

    public void setTagLevel(Integer tagLevel) {
        this.tagLevel = tagLevel;
    }

    public Integer getFatherTagId() {
        return fatherTagId;
    }

    public void setFatherTagId(Integer fatherTagId) {
        this.fatherTagId = fatherTagId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BookTagEntity that = (BookTagEntity) o;
        return tagId == that.tagId &&
                Objects.equals(tagName, that.tagName) &&
                Objects.equals(tagLevel, that.tagLevel) &&
                Objects.equals(fatherTagId, that.fatherTagId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(tagId, tagName, tagLevel, fatherTagId);
    }
}
